#include<iostream>
using namespace std;

const int N = 25;
int arr[N][N];
 
int main()
{
	int n; cin >> n;
	for (int i = 0; i < n; i++)
	{
		for (int j = 0; j <= i; j++)
		{
			if (j == 0 || i == j)
				arr[i][j] = 1;
			else if (i >= 2 && j >=1) 
				arr[i][j] = arr[i - 1][j - 1] + arr[i - 1][j];
			cout << arr[i][j]  << " ";
		}
		cout << endl;
	}

	return 0;
}
